﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;

namespace Mode
{
    /// <summary>
    /// 传回页面信息
    /// </summary>
    public class PageView
    {
        /// <summary>
        /// 当前页 Params["page"]
        /// </summary>
        public int PageIndex{ get; set; }
        
        /// <summary>
        /// 每页显示数Params["pagesize"]
        /// </summary>
        public int PageSize{ get; set; }
        
        /// <summary>
        /// 排序字段
        /// </summary>
        public string SortName{get; set; }

        /// <summary>
        /// 排序方式
        /// </summary>
        public string SortOrder { get; set; }

        /// <summary>
        /// 查询的表或视图名
        /// </summary>
        public string ViewName{get;set;}

        private string _fileds = "";
        /// <summary>
        /// 查询的字段集合，以逗号分隔
        /// </summary>
        public string Fields 
        {
            get { if (_fileds == "") return "*"; else return _fileds; }
            set{_fileds = value;}
        }

        /// <summary>
        /// 查询条件
        /// </summary>
        public NameValueCollection SearchParams { get; set; }
    }
}
